#include <iostream>
#include <string>
#include <vector>
using namespace std;
bool is_i(char ch){
	if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9')) return true;
	return false;
}
bool is_w1(char ch) {
	if (ch == '+'||ch == '-')return true;
	return false;
}
bool is_w2(char ch) {
	if (ch == '*' || ch == '/')return true;
	return false;
}
char T(char);
char F(char);
char E(char);
void Z() {
	char ch = getchar();
	ch = E(ch);
	if (ch == '\n')cout<<"True";
	else cout<<"False";
}
char E(char c) {
	char ch = T(c);
	while (is_w1(ch)) {
		ch = getchar();
		ch = T(ch);
	}
	return ch;
}
char T(char c) {
	char ch = F(c);
	while (is_w2(ch)) {
		ch = getchar();
		ch = F(ch);
	}
	return ch;
}
char F(char c) {
	if (is_i(c)) {
		return getchar();
	}
	else if (c == '(') {
		char ch = getchar();
		ch = E(ch);
		if (ch == ')')return getchar();
		else {
			cout << "False";
			exit(0);
		}
	}
	else {
		cout << "False";
		exit(0);
	}
}
int main() {
	Z();
}